package org.jeecg.modules.fund.util;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONArray;

/**
 * 获取股票的净值信息
 */
public class StockValueUtil {
    public static JSONArray getHttpData(String code){
        try {
            String res = HttpRequest.get("http://127.0.0.1:9999/api/public/stock_zh_a_hist?adjust=qfq&symbol=" + code)
                    .execute()
                    .body();
            return JSONArray.parseArray(res);
        }catch (Exception e){
            return null;
        }
    }
}
